package com.example.interactivehouse;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class InteraciveHouse extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Button lightin = (Button)findViewById(R.id.inlightindoors);
        lightin.setOnClickListener(new OnClickListener() { 
        	public void onClick(View v) { 
        			Intent i = new Intent(InteraciveHouse.this,LightIndoorsScreen.class);     
        			startActivity(i);        
        	}
        });
        Button window = (Button)findViewById(R.id.inwindow);
        window.setOnClickListener(new OnClickListener() { 
        	public void onClick(View v) { 
        		Intent i = new Intent(InteraciveHouse.this,Window.class);     
        		startActivity(i);        
        	}
        });
        Button lightout = (Button)findViewById(R.id.inlightoutdoors);
        lightout.setOnClickListener(new OnClickListener() { 
        	public void onClick(View v) { 
        		Intent i = new Intent(InteraciveHouse.this,LightOutdoorsScreen.class);     
        		startActivity(i);        
        	}
        });
        Button alarm = (Button)findViewById(R.id.inalarm);
        alarm.setOnClickListener(new OnClickListener() { 
        	public void onClick(View v) { 
        		Intent i = new Intent(InteraciveHouse.this,AlarmScreen.class);     
        		startActivity(i);        
        	}
        });
        Button fan = (Button)findViewById(R.id.infan);
        fan.setOnClickListener(new OnClickListener() { 
        	public void onClick(View v) { 
        		Intent i = new Intent(InteraciveHouse.this,FanScreen.class);     
        		startActivity(i);        
        	}
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    
}
